package com.czh.controller;

import com.czh.domain.ResponseResult;
import com.czh.domain.entity.Message;
import com.czh.domain.vo.MessageVo;
import com.czh.service.CommentService;
import com.czh.service.MessageService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * @author caozaihui
 */
@RestController
public class MessageController {
    @Resource
    private MessageService messageService;
    @PostMapping("/sendMessage")
    public ResponseResult<Object> sendMessage(@RequestBody Message message){
        return messageService.sendMessage(message);
    }
    @GetMapping("/messageList")
    public ResponseResult<List<MessageVo>> getMessageList(){
        return messageService.getMessageList();
    }
}
